<%@ page contentType="text/html; charset=utf-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib uri="http://www.springframework.org/tags" prefix="spring"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<form:form method="post" action="account" commandName="accountInfo"
	autocomplete="false">
	<form:errors path="*" cssClass="errorblock" element="div" />
	<c:if test="${successfulMessage != null}">
		<div class="successfulBlock">
			<spring:message code="successful.updateaccount" />
		</div>
	</c:if>
	<form:hidden path="id" />
	<div class="allElements">
		<h2>
			<spring:message code="personalinfo" />
			<span></span>
		</h2>
		<h3 style="padding-left: 11px;">
			<spring:message code="balance" />
			:
			<fmt:formatNumber type="number" value="${accountInfo.money }"
				groupingUsed="true" />
			VNĐ <span></span>
		</h3>
		<a class="btnSubmit"
			style="text-decoration: none; color: white; position: relative; text-align: center; width: 100px; margin: 5px 0 0 0; left: 11px;"
			href="<c:url value="/deposit"/>"><spring:message code="deposit" /></a>
		<form:hidden path="userName" />
		<div class="registerElement">
			<label><spring:message code="fullname" /></label>
			<form:input class="registerInput" path="name" />
		</div>
		<div class="registerElement">
			<label><spring:message code="birthday" /></label>
			<form:input cssClass="datepicker" path="birthday" />
		</div>
		<div class="registerElement">
			<label><spring:message code="sex" /></label>
			<form:select items="${sexs}" class="registerInput" path="sex" />
		</div>
		<c:if test="${externalAccount == null}">
			<h2 style="margin-top: 30px;">
				<spring:message code="accountinfo" />
				<span></span>
			</h2>
			<div class="registerElement">
				<label><spring:message code="newpassword" /></label>
				<form:password class="registerInput" path="userPassword"
					autocomplete="false" />
			</div>
			<div class="registerElement">
				<label><spring:message code="confirmpassword" /></label>
				<form:password class="registerInput" path="confirmPassword"
					autocomplete="false" />
			</div>
		</c:if>
		<input class="btnSubmit" type="submit"
			value="<spring:message code="save" />" />
	</div>
</form:form>